package com.martini.satoken01.service;

import org.apache.rocketmq.spring.core.RocketMQTemplate;

/**
 * RocketMQ消息队列服务
 *
 * @author martini at 2021/12/23 15:38
 */
public class RocketMessageQueueServiceImpl implements MessageQueueService {

    private final RocketMQTemplate rocketMQTemplate;

    public RocketMessageQueueServiceImpl(RocketMQTemplate rocketMQTemplate) {
        this.rocketMQTemplate = rocketMQTemplate;
    }

    @Override
    public void sendOneWay(String destination, Object payload) {
        this.rocketMQTemplate.sendOneWay(destination, payload);
    }
}
